# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Connectors.V1.Model.CustomConnector do
  @moduledoc """
  CustomConnector represents the custom connector defined by the customer as part of byoc.

  ## Attributes

  *   `activeConnectorVersions` (*type:* `list(String.t)`, *default:* `nil`) - Output only. Active connector versions.
  *   `allConnectorVersions` (*type:* `list(String.t)`, *default:* `nil`) - Output only. All connector versions.
  *   `allMarketplaceVersions` (*type:* `list(String.t)`, *default:* `nil`) - Output only. All marketplace versions.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Created time.
  *   `customConnectorType` (*type:* `String.t`, *default:* `nil`) - Required. Type of the custom connector.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Optional. Description of the resource.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Optional. Display name.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources
  *   `logo` (*type:* `String.t`, *default:* `nil`) - Optional. Logo of the resource.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Identifier. Resource name of the CustomConnector. Format: projects/{project}/locations/{location}/customConnectors/{connector}
  *   `publishedMarketplaceVersions` (*type:* `list(String.t)`, *default:* `nil`) - Output only. Published marketplace versions.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Updated time.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :activeConnectorVersions => list(String.t()) | nil,
          :allConnectorVersions => list(String.t()) | nil,
          :allMarketplaceVersions => list(String.t()) | nil,
          :createTime => DateTime.t() | nil,
          :customConnectorType => String.t() | nil,
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :labels => map() | nil,
          :logo => String.t() | nil,
          :name => String.t() | nil,
          :publishedMarketplaceVersions => list(String.t()) | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:activeConnectorVersions, type: :list)
  field(:allConnectorVersions, type: :list)
  field(:allMarketplaceVersions, type: :list)
  field(:createTime, as: DateTime)
  field(:customConnectorType)
  field(:description)
  field(:displayName)
  field(:labels, type: :map)
  field(:logo)
  field(:name)
  field(:publishedMarketplaceVersions, type: :list)
  field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.Connectors.V1.Model.CustomConnector do
  def decode(value, options) do
    GoogleApi.Connectors.V1.Model.CustomConnector.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Connectors.V1.Model.CustomConnector do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
